package lx.utils;

import lx.utils.system.ScreenUtils;
import android.app.Application;
import android.content.Context;

public class ThisApp extends Application {

    private static Context sInstance;

    @Override
    public void onCreate() {
        super.onCreate();
        sInstance = this;
    }

    public static Context getInstance() {
        return sInstance;
    }

    private static int mScreenWidth = 0;

    public static int getScreenWidth() {
        if (mScreenWidth == 0) {
            mScreenWidth = ScreenUtils.getScreenWidth(getInstance());
        }
        return mScreenWidth;
    }

}
